package com.yingside.collection;

import java.util.ArrayList;
import java.util.List;
import java.util.Stack;

public class TestGeneric {
    public static void main(String[] args) {
//        Box1 box1 = new Box1();

//        box1.setObj("abc");
//
//        box1.show();
//
//        Object obj = box1.getObj();

//        Student s = new Student(1,"zhangsan","342423");
//
//        box1.setObj(s);
//
//        Student student = (Student)box1.getObj();


        List<String> list = new ArrayList<>();

        Stack<String> stack = new Stack<>();
        //push pop peek

        Box2<Student> box2 = new Box2<Student>();
        box2.setObj(new Student(1,"aaa","w33432"));

        Student obj = box2.getObj();
    }
}
